{extend name=".././view/create.html" /}
{block name="jscss"}
{/block}
{block name="form"}
<form class="layui-form layui-form-pane" lay-filter="myform">
	<div class="layui-form-item">
		<label for="teacher_name" class="layui-form-label">
			<span class="x-red">*</span>教师姓名
		</label>
		<div class="layui-input-block" id="teacher_id" school_id="{$list.data.school_id|default=''}">
		</div>
	</div>
	<div class="layui-form-item">
		<label for="bfdate" class="layui-form-label">
			接任时间
		</label>
		<div class="layui-input-block">
			<input type="text" id="bfdate" lay-verify="required" name="bfdate" autocomplete="off" class="layui-input " value="{$list.data.bfdate|default=''}" placeholder="接到这个任务的开始时间">
		</div>
	</div>
	<input name="banji_id" id="banji_id" value="{$list.data.banji_id}" type="hidden">
	<div class="layui-form-item" style="text-align: right;">
		<button class="layui-btn" lay-filter="mysubmit" lay-submit="">
			{$list.set.butname}
		</button>
	</div>
</form>
{/block}
{block name="myjs"}
<script>
// 日期控件
layui.use(['form', 'laydate', 'createInput'], function() {
	var form = layui.form,
		cInput = layui.createInput,
		laydate = layui.laydate;

	//执行一个laydate实例
	laydate.render({
		elem: '#bfdate', //指定元素
		trigger: 'click' //采用click弹出
	});

	// 搜索教师
	xmselect = cInput.searchTeacher('teacher_id', true);

	// 添加数据库值
	formpost = "{$list.set.formpost|default=''}".toLocaleUpperCase();
	if (formpost == 'PUT') {
		xmselect.update({
			data: [{
				xingming: "{$list.data.selectname|default=''}",
				id: "{$list.data.teacher_id|default=''}",
				selected: true
			}, ]
		})
	}


});

</script>
{/block}
